<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

	<title>Table Test (steel)</title>

	<link rel="stylesheet" href="../../../../../dojo/dojo/resources/dojo.css">
	<link rel="stylesheet" href="../../../../../dojo/dijit/tests/css/dijitTests.css">
	<style type="text/css">
	.widgetContainer {
		padding-top: 10px;
		width: 190px;
	}
	.widgetContainerH {
		padding-top: 100px;
	}

	.testTitle {
		padding-bottom: 10px;
	}
	
	body {
		padding-top: 100px;
	}
	.timing {
		color: #e5322a;
	}
	</style>

	<!-- required: a default dijit theme: -->
	<link rel="stylesheet" href="../../../themes/steel/SteelBase.css">
	<link rel="stylesheet" href="../../../themes/steel/swt.css">

	 <script type="text/javascript">
            djConfig = {
                isDebug : true,
                debugAtAllCosts : false,
                parseOnLoad : true,
                baseUrl : "../../../../../dojo/dojo/",
                modulePaths : {
                	'swt' : '../../swt-core/swt'
                }
            };
    </script>
	<script type="text/javascript" src="../../../../../dojo/dojo/dojo.js"></script>

	<script language="JavaScript" type="text/javascript">
		//dojo.require("dijit.dijit"); // optimize: load dijit layer
		dojo.require("dojo.store.Memory");
		dojo.require("swt.widget.table.Table");
		dojo.require("dojo.parser");	// scan page for widgets and instantiate them

		function myHandler(args){
			console.debug("myHandler-->" +args);
		}
		
		var data;
		// get the data
		dojo.xhrGet({url:"../data/devices.json", sync:true, handleAs:"json"}).addCallback(function(results){
			data = results;
		});
		var deviceStore =  new dojo.store.Memory({data:data.items, idProperty: data.identifier});
		var structure;
		//get structure
		dojo.xhrGet({url:"../data/deviceStructureNarrow.json", sync:true, handleAs:"json"}).addCallback(function(results){
			structure = results;
		});
		var xx="";
		startTime = new Date();
		dojo.addOnLoad(function(){
			var elapsed = new Date().getTime() - startTime;
			var p = document.createElement("p");
			p.appendChild(document.createTextNode("Widgets loaded in " + elapsed + "ms"));
			dojo.byId("timing").appendChild(p);
			console.log("Widgets loaded in " + elapsed + "ms");
		});
	</script>

</head>
<body class="steel">
<div class="timing" id="timing"></div>
<div dojoType="swt.widget.table.Table" style="width:1000px;height:600px;" structure="structure" store="deviceStore" tableTitle="Devices">
</div>
</body>
</html>